A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the United States Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The present invention is directed to computer systems, and more particularly, to methods, apparatus, and computer program products for communicating between a host computer and an adapter card connected to the input/output bus of the host computer.
The use of adapter cards to expand the capability of a host computer system is well known. Adapter cards are used to provide a wide variety of added or enhanced functionality to a host computer system, such as peripheral device interfaces, network communications interfaces, and graphics processing. Such adapter cards typically connect to the input/output bus of the host computer system. Several well-known industry standard input/output bus architectures include the Industry Standard Architecture (ISA), the Extended Industry Standard Architecture (EISA), and the Peripheral Component Interconnect (PCI) bus architecture. A computer system having any of these input/output bus architectures typically is equipped with a plurality of xe2x80x9cslotsxe2x80x9d into which adapter cards can be inserted. Each slot is in essence a connector that connects to the address and data lines of the input/output bus. Each adapter card includes a mating connector, usually a printed circuit board edge connector, that can be inserted into one of the connectors, i.e., slots, of the host computer system.
Recently, there has been increased attention to designing more xe2x80x9cintelligentxe2x80x9d adapter cards to better off-load certain processing tasks, such as I/O processing, from the host computer. For example, the computer industry recently has begun to adopt and to implement solutions based on the Intelligent I/O (I2O) Architecture Specification, which describes standard specifications for the development of intelligent I/O adapters and associated device driver software. These intelligent adapter cards typically include some form of instruction processor, such as an i960(copyright) or StrongARM(copyright) processor, both available from Intel Corporation, that can be programmed to perform various tasks that might otherwise not be available in a conventional adapter card. Local read-only and random-access memories are usually provided for storing and executing program code on the adapter card.
Many computer system architectures can be viewed as a series-of layers. The lowest layer is the actual hardware. The highest layer is the application program that interacts with the user. Between the hardware and application program layers is a layer of system software. System software typically includes the operating system and various devices drivers. The original IBM PC architecture, which has developed into the industry standard PC architecture used in more advanced personal computers, workstations, and servers today, includes an additional low-level software layer between the hardware and the system software. This low-level software layer is commonly referred to as the Basic Input/Output System (BIOS). The BIOS insulates the system and application software from the hardware and provides primitive I/O services and the ability to program the hardware""s interrupt handling.
The system BIOS in computers and servers based on the industry standard PC architecture has the ability to extend or modify portions of the BIOS code with so-called BIOS extensions, sometimes also referred to as expansion ROMs or option ROMs. In the case of an adapter card, for example, a BIOS extension can be provided on the card to provide additional BIOS level control of certain low-level features of the card. For example, such BIOS extensions are commonly found on SCSI, video, and network interface adapter cards. When the host system BIOS executes its power-on self-test (POST), it searches for any BIOS extension code provided on any adapter cards connected to its input/output bus. If a BIOS extension is located, the host loads the BIOS extension code into its host memory for execution (a process sometimes referred to as xe2x80x9cshadowingxe2x80x9d). After executing the BIOS extension code, the system BIOS completes its normal POST execution, which typically concludes with the booting of the operating system.
As additional background information, computers and servers based on the industry standard PC architecture are mainly controlled through the use of interrupts. Interrupts can be generated by the processor, other hardware devices, or the software. When an interrupt occurs, control of instruction execution transfers to a software routine, commonly referred to as an interrupt handling routine, that provides an appropriate programmed response to the interrupt. Each interrupt is assigned its own unique interrupt number, and each interrupt number is associated with its respective interrupt handling routine by an interrupt vector that specifies the address in the host memory or system BIOS of the interrupt handling routine.
A table of interrupt vectors is created by the system BIOS during its POST routine. The system BIOS creates the interrupt vector table in host memory from a rom-based table and initializes the vector addresses of the low-level interrupt handling routines of the BIOS. Afterwards, the operating system boots and initializes any of the vector addresses of interrupts that are reserved for it. Likewise, an application program that issues its own interrupts must initialize the associated vector addresses in the table. A process known as xe2x80x9chooking an interruptxe2x80x9d can be used by software to replace an already established interrupt vector address with a new address of a different interrupt handling routine to alter the system response to that particular interruptxe2x80x94the original interrupt vector address for that interrupt number is replaced in the interrupt vector table with the new address.
Microprocessor interrupts are invoked by the processor as a result of some unusual program result, such as an attempt to divide by zero. In the standard PC architecture, interrupt numbers 00h-04h (typically designated INT 00h-04h) are reserved for the processor. Hardware interrupts are invoked by peripheral devices that set their respective interrupt request lines (IRQ). Each time a key is pressed, for example, the keyboard hardware generates an interrupt. Hardware interrupts are vectored to Interrupt Service Routines (ISRs) (a form of interrupt handling routine) that generally reside in the system BIOS. INTs 08h-0Fh and 70h-77h are reserved by the system BIOS for hardware interrupts. Lastly, software interrupts are invoked via the 80xc3x9786 INT instruction. Most software interrupts are vectored to Device Service Routines (DSRs) (another form of interrupt handling routine) located in the BIOS, in the operating system, or in an application program.
Communication between a host computer and an adapter card is usually performed by the use of device drivers in combination with the host operating system. Each adapter card is typically provided with one or more device drivers that are loaded and installed on the host computer system. A device driver insulates the operating system and application programs from the low-level hardware details of the adapter card. Nevertheless, it may be desirable in some cases to enable communication between a host computer system and an adapter card in the absence of the host operating system or before the host operating system boots. It would also be desirable for the adapter card to be able to utilize such communications to invoke various functions of the system BIOS in the absence of the host operating system. The present invention provides a method and apparatus for establishing such communication.
The present invention is directed to a method, apparatus, and computer program product for establishing communications between an adapter card and a host computer system running in a BIOS supported environment. According to the present invention, communications between the adapter card and the host computer system are established by embedding a server program within a BIOS extension stored in a memory on the adapter card. The BIOS extension is loaded into the host memory during normal execution of the host system BIOS for execution by the host processor. When executed by the host processor, the BIOS extension code copies the server program embedded within it to a new location in host memory, and then hooks the new location of the server program to a pre-selected interrupt of the host computer system to cause the host processor to initiate execution of the server program on the host computer system upon a subsequent occurrence of that interrupt. Preferably, the pre-selected interrupt number to which the server program code is hooked is one that is normally invoked by the system BIOS at some point in its execution. When the server program executes, it then establishes communication with a client program executing on a processor of the adapter card.
In a preferred embodiment, the present invention prevents the host operating system from booting, allowing communications between the adapter card and the host computer system to occur in the absence of a host operating system, but with access to the full range of functions provided by the host system BIOS. For example, the client program on the adapter card can communicate a request to the server program to invoke any of the normal functions of the host system BIOS. Any results can be communicated back to the client program.
In an alternative embodiment, the host operating system is permitted to boot, in which case the server program operates in the presence of the host operating system.
Additional features and advantages of the present invention will become evident hereinafter.